﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Pay.Data {
    public partial class LogisticsListMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<LogisticsList> {
        public LogisticsListMap() {
            // table
            ToTable("mc_LogisticsList", "dbo");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.High)
                .HasColumnName("High")
                .IsOptional();
            Property(t => t.Length)
              .HasColumnName("Length")
              .IsOptional();
            Property(t => t.PayinfoIds)
               .HasColumnName("PayinfoIds")
               .HasMaxLength(1000)
               .IsRequired();
            Property(t => t.Width)
              .HasColumnName("Width")
              .IsOptional();
            Property(t => t.BoardName)
              .HasColumnName("BoardName")
              .HasMaxLength(50)
              .IsRequired();
            Property(t => t.BoardNO)
              .HasColumnName("BoardNO")
              .HasMaxLength(50)
              .IsRequired();
            Property(t => t.FlightNO)
            .HasColumnName("FlightNO")
            .HasMaxLength(50)
            .IsOptional();
            Property(t => t.CreateTime)
             .HasColumnName("CreateTime")
              .IsRequired();
            Property(t => t.Type)
           .HasColumnName("Type")
            .IsRequired();
            Property(t => t.Status)
           .HasColumnName("Status")
            .IsRequired();

            //HasRequired(t => t.Logistics)
            //  .WithMany()
            //  .HasForeignKey(d => d.LogisticsId)
            //  .WillCascadeOnDelete(false);



        }
    }
}
